<script setup lang="ts">
import { ref } from 'vue';
</script>

<template>
  <page class="page" custom-overflow="visible">
    <page-template footerBtnTitle="点击查看更多" :footerBtnIcon="true">
      <view class="honor-head"></view>
      <view class="honor-banner">
        <view class="honor-banner-list">
          <view class="honor-banner-item" v-for="item in 2" :key="item">
            <view class="img-box">
              <image src="https://meizuly.oss-cn-shanghai.aliyuncs.com/xcxPic/h5/pura-70.png" mode="aspectFill"></image>
              <view class="discount">立减 600元</view>
            </view>
            <view class="honor-banner-item-right">
              <view class="title">Pura 70 Ultra</view>
              <view class="desc">探索未见之美</view>
              <view class="bottom-box">
                <price-box num="15.24" color="#FF1717"></price-box>
                <hire-button style="margin-left: 6rpx;"></hire-button>
              </view>
            </view>
          </view>
        </view>
      </view>
      <view class="honor-single" v-for="item in 2" :key="item">
        <view class="honor-single-head">
          <image src="https://meizuly.oss-cn-shanghai.aliyuncs.com/xcxPic/h5/pura-70.png" mode="aspectFill"></image>
          <view class="right">
            <view class="right-item" v-for="item in 3" :key="item">
              <image src="https://meizuly.oss-cn-shanghai.aliyuncs.com/xcxPic/h5/pura-70.png" mode="aspectFill"></image>
              <view class="right-item-desc">2K E7 超色准屏</view>
            </view>
          </view>
        </view>
        <view class="honor-single-body">
          <view class="left">
            <view class="title-box">
              <mark-tips></mark-tips>
              <text class="text">Pura 70 Ultra</text>
            </view>
            <view class="desc">探索未见之美 打开全新视界</view>
          </view>
          <view class="right">
            <hire-button title="立即抢租" >
                <view class="price-left">
                  <price-box num="15.24" color="#FFF0C7"></price-box>
                </view>
              </hire-button>
          </view>
        </view>
      </view>
      <view class="honor-series">
        <view class="honor-series-head">
          <view class="honor-series-head-title">荣耀100系列</view>
          <view class="honor-series-head-desc">探索未见之美 打开全新视界</view>
        </view>
        <view class="honor-series-body">
          <view class="honor-series-item" v-for="item in 2" :key="item">
            <image src="https://meizuly.oss-cn-shanghai.aliyuncs.com/xcxPic/h5/pura-70.png" mode="aspectFill"></image>
            <view class="honor-series-mark">
              <mark-tips></mark-tips>
              <discount-button style="margin-left: 10rpx;"></discount-button>
            </view>
            <view class="honor-series-item-title">Pura 70 Ultra</view>
            <hire-button title="立即抢租" >
              <view class="price-left">
                <price-box num="15.24" color="#FFF0C7"></price-box>
              </view>
            </hire-button>
          </view>
        </view>
      </view>
      <view class="honor-hot">
        <view class="honor-hot-head">爆款热销</view>
        <view class="honor-hot-body">
          <view class="honor-hot-item" v-for="item in 6" :key="item">
            <view class="honor-hot-item-mark">当季新品</view>
            <image src="https://meizuly.oss-cn-shanghai.aliyuncs.com/xcxPic/h5/pura-70.png" mode="aspectFill"></image>
            <view class="honor-hot-item-title">Pura 70 Ultra</view>
            <view class="honor-hot-item-bottom">
              <price-box num="15.24" color="#FF1717"></price-box>
              <hire-button style="margin-left: 8rpx;"> </hire-button>
            </view>
          </view>
        </view>
      </view>
    </page-template>
  </page>
</template>
<style lang="scss" scoped>
.honor{
  &-head{
    margin-left: -20rpx;
    margin-right: -20rpx;
    height: 484rpx;
    background: url('https://meizuly.oss-cn-shanghai.aliyuncs.com/xcxPic/h5/honor-head.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
  }
  &-banner{
    padding-top: 360rpx;
    margin-top: -206rpx;
    height: 548rpx;
    background: url('https://meizuly.oss-cn-shanghai.aliyuncs.com/xcxPic/h5/honor-banner.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    &-list{
      padding: 10rpx;
      display: flex;
      background: #FFFFFF;
      border-radius: 20rpx;
    }
    &-item{
      position: relative;
      padding: 10rpx 8rpx 10rpx 0;
      width: calc( 50% - 5rpx );
      display:flex;
      align-items: center;
      &:first-child{
        margin-right: 10rpx;
      }
      &::after{
        content: '';
        display: block;
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        width: 1rpx;
        background: #F5F5F5;
      }
      .img-box{
        display:flex;
        flex-direction: column;
        align-items: center;
        image{
          width: 120rpx;
          height: 148rpx;
          border-radius: 18rpx;
        }
        .discount{
          width: 120rpx;
          margin-top: -32rpx;
          height: 32rpx;
          line-height: 32rpx;
          background: #FF1717;
          border-radius: 10rpx;
          border: 2rpx solid #FF1717;
          font-family: PingFang SC;
          font-weight: bold;
          font-size: 20rpx;
          color: #FFFFFF;
          z-index: 100;
        }
      }
      &-right{
        flex: 1;
        margin-left: 10rpx;
        display:flex;
        flex-direction: column;
        justify-content: center;
        .title{
          font-family: Alibaba PuHuiTi;
          font-weight: bold;
          font-size: 29rpx;
          color: #000000;
          line-height: 41rpx;
        }
        .desc{
          margin: 5rpx 0;
          font-family: PingFang SC;
          font-weight: bold;
          font-size: 24rpx;
          color: #999999;
          line-height: 33rpx;
        }
        .bottom-box{
          display: flex;
        }
      }
    }
  }
  &-single{
    padding: 10rpx 16rpx 20rpx;
    margin-top: 20rpx;
    background: #FFFFFF;
    border-radius: 20rpx;
    &-head{
      display:flex;
      image{
        width:164rpx;
        height: 164rpx;
      }
      .right{
        margin-left: 10rpx;
        padding-top: 20rpx;
        flex:1;
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        &-item{
          position: relative;
          flex:1;
          text-align: center;
          &::after{
            position: absolute;
            right: 0;
            top: 20rpx;
            bottom: 20rpx;
            content: '';
            display: block;
            width: 1rpx;
            background: #F5F5F5;
          }
          image{
            width: 100rpx;
            height: 68rpx;
            border-radius: 6rpx;
          }
          &-desc{
            font-family: PingFang SC;
            font-weight: bold;
            font-size: 20rpx;
            color: #333333;
            line-height: 28rpx;
          }
        }
      }
    }
    &-body{
      background: #ffffff;
      display: flex;
      justify-content: space-between;
      align-items: flex-end;
      .left{
        .title-box{
          margin-bottom: 6rpx;
          display: flex;
          align-items: center;
          .text{
            margin-left: 8rpx;
            font-family: Alibaba PuHuiTi;
            font-weight: bold;
            font-size: 34rpx;
            color: #000000;
            line-height: 47rpx;
          }
        }
        .desc{
          font-family: PingFang SC;
          font-weight: bold;
          font-size: 24rpx;
          color: #333333;
          line-height: 33rpx;
        }
      }
    }
  }
  &-series{
    padding: 10rpx 12rpx;
    background: #ffffff;
    margin-top: 20rpx;
    border-radius: 20rpx;
    &-head{
      padding: 20rpx;
      text-align: center;
      &-title {
        font-family: Alimama ShuHeiTi;
        font-weight: 1000;
        font-size: 45rpx;
        color: #171717;
        line-height: 63rpx;
      }
      &-desc{
        margin-top: 10rpx;
        font-family: Alibaba PuHuiTi;
        font-weight: 600;
        font-size: 24rpx;
        color: #171717;
        line-height: 33rpx;
      }
    }
    &-body{
      display: flex;
    }
    &-item{
      flex:1;
      padding: 10rpx 16rpx;
      display: flex;
      flex-direction: column;
      align-items: center;
      image{
        margin-bottom: 20rpx;
        width: 164rpx;
        height: 197rpx;
        border-radius: 18rpx;
      }
      &-title{
        margin-bottom: 8rpx;
        font-family: Alibaba PuHuiTi;
        font-weight: bold;
        font-size: 29rpx;
        color: #000000;
        line-height: 41rpx;
      }
    }
    &-mark{
      display: flex;
    }
  }
  &-hot{
    margin-top: 20rpx;
    margin-bottom: 10rpx;
    &-head{
      margin-bottom: 20rpx;
      font-family: Alimama ShuHeiTi;
      font-weight: 1000;
      font-size: 44rpx;
      color: #333333;
      line-height: 62rpx;
      text-align: center;
    }
    &-body{
      padding: 0 12rpx;
      display:flex;
      flex-wrap: wrap;
    }
    &-item{
      margin-right: 10rpx;
      margin-bottom:10rpx;
      width: 220rpx;
      position: relative;
      display: flex;
      flex-direction: column;
      align-items: center;
      background: #FFFFFF;
      border-radius: 20rpx;
      &-mark{
        padding: 0 10rpx;
        position: absolute;
        left: 4rpx;
        top: 4rpx;
        height: 30rpx;
        line-height: 30rpx;
        background: #FDEBBB;
        border-radius: 15rpx 0rpx 15rpx 0rpx;
        font-family: PingFang SC;
        font-weight: bold;
        font-size: 20rpx;
        color: #000000;
        line-height: 28rpx;
        text-shadow: 0px 3px 6px rgba(255,0,0,0.16);
        text-align: center;
        z-index: 100;
      }
      &:nth-child(3n){
        margin-right: 0;
      }
      image{
        margin-bottom: 10rpx;
        width: 150rpx;
        height: 150rpx;
      }
      &-title{
        font-family: Alibaba PuHuiTi;
        font-weight: bold;
        font-size: 29rpx;
        color: #000000;
        line-height: 41rpx;
      }
      &-bottom{
        display:flex;
      }
    }
  }
}
.price-left{
  padding-right:10rpx;
  margin-right: 11rpx;
  position: relative;
  &::after{
    position: absolute;
    right: 0;
    top: 12rpx;
    bottom: 12rpx;
    content: '';
    display: block;
    width: 1rpx;
    background: #F5F5F5;
  }
}
</style>
